package com.jichaoyun.dao.mapper;

//import com.baomidou.dynamic.datasource.annotation.DS;
import com.jichaoyun.model.entity.TUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
* @author zhen
* @description 针对表【t_user】的数据库操作Mapper
* @createDate 2023-12-23 10:31:51
* @Entity com.jichaoyun.model.entity.TUser
*/


@Mapper
public interface TUserMapper extends BaseMapper<TUser> {

     void createTable(@Param("resultTableName") String resultTableName);

    @Select("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = #{resultTableName}")
    Map<String,Object> checkIfExist(String resultTableName);

    List<TUser> selectAll();

    Integer selectAll_COUNT();

//    @DS("sharding")
    List<TUser> selectByPage(@Param("offSet") Integer offSet, @Param("pageSize") Integer pageSize);

    List<TUser> selectSelectBy(@Param("start") LocalDateTime start,@Param("end") LocalDateTime end);
}




